package com.org.shichui.common;

import com.alibaba.fastjson.JSONObject;

import java.util.Date;

/**
 * @author: zhangzeli
 * @date 11:58 2018/8/1
 * <P></P>
 */
public class SocketMessage {
    public MesType message;

    public Object body;

    public SocketMessage(MesType message, Object body) {
        this.message = message;
        this.body = body;
    }

    public SocketMessage() {
    }

    public MesType getMessage() {
        return message;
    }

    public void setMessage(MesType message) {
        this.message = message;
    }

    public Object getBody() {
        return body;
    }

    public void setBody(Object body) {
        this.body = body;
    }


    public static void main(String[] args) {
        SocketMessage s = new SocketMessage();
        s.setMessage(MesType.PING);
        s.setBody(new Date());
        System.out.printf(JSONObject.toJSONString(s));
    }
}
